﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Framework.Common.Paged;
using YouTravel.QueryModels;
using Framework.IOC;
using YouTravel.DomainModels;
using System.Collections.Generic;

namespace YouTravel.DomainService.Test
{
    [TestClass]
    public class TestBranchService : TestBase
    {
        IBranchService branchService;
        IUserService userService;
        public User CurrentUser { get; set; }
        public TestBranchService()
        {

            this.branchService = ServiceLocator.Instance.GetService<IBranchService>();
            this.userService = ServiceLocator.Instance.GetService<IUserService>();
            //CurrentUser = userService.Login("admin", "14e1b600b1fd579f47433b88e8d85291");
        }
        [TestMethod]
        public void TestGetList()
        {
            PagedParam<BranchQuery> queryCond = new PagedParam<BranchQuery>()
            {
                PageDto = new PageDto { PageNo = 1, PageSize = 10 },

            };
            branchService.GetList(queryCond);
        }
        [TestMethod]
        public void TestAdd()
        {
			//User u = new User();
			//Branch model = new Branch();
			//model.Name = "12321";
			//model.OweTicketsDay = 12;
			//model.Status = true;
			//model.ArrearsTotal = 1000;
			//model.CounterFeeRate = 50;
			//model.GrossMargin = 50;
			//model.Type = Enums.BranchType.Branch;
			//model.CreaterId = CurrentUser.ID;
			//model.CreateTime = DateTime.Now;
			//branchService.Add(model);
        }
    }
}
